<?

echo "MODIFY MODE :" 	.$_SESSION["modify_mode"]. "<br/>\n";

if($_SESSION["modify_mode"] == "Y"){

	$status_of_write="Modify";
}else{

	$status_of_write="Confirm";
}

require("entry_header_html.php");

/**
* Detail goes here
*
*/
echo  "<table border='1' class='dedeq'>\n".
      "<th> NO        </th>\n".
      "<th> LEVELMN   </th>\n".
      "<th> DESCP     </th>\n".
      "<th> STATUS    </th>\n".
      "<th> ENTRY     </th>\n".
      "<th> MODIFY    </th>\n".
      "<th> DELETE    </th>\n".
      "<th> VIEW      </th>\n".
      "<th> FINALIZE  </th>\n".
      "<th> APPROVED  </th>\n".
      "<th> JOURNAL   </th>\n".
      "<th> PROGRAMS  </th>\n".
      "<th> PICT      </th>\n";

$nAccess = sizeof($_POST["levelMnEnt"]);

for($iRow = 0; $iRow < $nAccess; $iRow++){
  
  $Misc->setValue($statusEntChk,0);
  $Misc->setValue($entryEntChk,0);
  $Misc->setValue($modifyEntChk,0);
  $Misc->setValue($deleteEntChk,0);
  $Misc->setValue($viewEntChk,0);
  $Misc->setValue($finalizeEntChk,0);
  $Misc->setValue($approvedEntChk,0);
  $Misc->setValue($journalEntChk,0);
  $Misc->setValue($programsEntChk,0);
  $Misc->setValue($pictEntChk,0);
  
  if($_POST["statusEnt"][$iRow] != ""){
        
    $statusEntChk = _IS_CHECKED;
  }
  
  if($_POST["entryEnt"][$iRow] != ""){
    
    $entryEntChk = _IS_CHECKED;
  }
  
  if($_POST["modifyEnt"][$iRow] != ""){
    
    $modifyEntChk = _IS_CHECKED;
  }
  
  if($_POST["deleteEnt"][$iRow] != ""){
    
    $deleteEntChk = _IS_CHECKED;
  }
  
  if($_POST["viewEnt"][$iRow] != ""){
    
    $viewEntChk = _IS_CHECKED;
  }
  
  if($_POST["finalizeEnt"][$iRow] != ""){
    
    $finalizeEntChk = _IS_CHECKED;
  }
  
  if($_POST["approvedEnt"][$iRow] != ""){
    
    $approvedEntChk = _IS_CHECKED;
  }
  
  if($_POST["journalEnt"][$iRow] != ""){
    
    $journalEntChk = _IS_CHECKED;
  }
  
  if($_POST["programsEnt"][$iRow] != ""){
    
    $programsEntChk = _IS_CHECKED;
  }
  
  if($_POST["pictEnt"][$iRow] != ""){
    
    $pictEntChk = _IS_CHECKED;
  }
  
  echo  "<tr>\n".
        
          "<td> ".($iRow + 1)." </td>\n".
          
          "<td> ".$GHtml->formInput("levelMnEnt[".$iRow."]",
                                    $_POST["levelMnEnt"][$iRow],
                                    _MODE_READONLY)." </td>\n".
          
          "<td> ".$GHtml->formInput("descpEnt[".$iRow."]",
                                    $_POST["descpEnt"][$iRow],
                                    _MODE_READONLY)." </td>\n".
          
          "<td> ".$GHtml->formCheckBox("statusEnt[".$iRow."]",
                                       $_POST["statusEnt"][$iRow],
                                       _MODE_DISABLE.
                                       $statusEntChk)." </td>\n".
          
          "<td> ".$GHtml->formCheckBox("entryEnt[".$iRow."]",
                                       $_POST["entryEnt"][$iRow],
                                       _MODE_READONLY.
                                       $entryEntChk)." </td>\n".
          
          "<td> ".$GHtml->formCheckBox("modifyEnt[".$iRow."]",
                                       $_POST["modifyEnt"][$iRow],
                                       _MODE_READONLY.
                                       $modifyEntChk)." </td>\n".
          
          "<td> ".$GHtml->formCheckBox("deleteEnt[".$iRow."]",
                                       $_POST["deleteEnt"][$iRow],
                                       _MODE_READONLY.
                                       $deleteEntChk)." </td>\n".
          
          "<td> ".$GHtml->formCheckBox("viewEnt[".$iRow."]",
                                       $_POST["viewEnt"][$iRow],
                                       _MODE_READONLY.
                                       $viewEntChk)." </td>\n".
          
          "<td> ".$GHtml->formCheckBox("finalizeEnt[".$iRow."]",
                                       $_POST["finalizeEnt"][$iRow],
                                       _MODE_READONLY.
                                       $finalizeEntChk)." </td>\n".
          
          "<td> ".$GHtml->formCheckBox("approvedEnt[".$iRow."]",
                                       $_POST["approvedEnt"][$iRow],
                                       _MODE_READONLY.
                                       $approvedEntChk)." </td>\n".
          
          "<td> ".$GHtml->formCheckBox("journalEnt[".$iRow."]",
                                       $_POST["journalEnt"][$iRow],
                                       _MODE_READONLY.
                                       $journalEntChk)." </td>\n".
          
          "<td> ".$GHtml->formCheckBox("programsEnt[".$iRow."]",
                                       $_POST["programsEnt"][$iRow],
                                       _MODE_READONLY.
                                       $programsEntChk)." </td>\n".
          
          "<td> ".$GHtml->formCheckBox("pictEnt[".$iRow."]",
                                       $_POST["pictEnt"][$iRow],
                                       _MODE_READONLY.
                                       $pictEntChk)." </td>\n".
  
        "</tr>\n";
}

echo  "</table><br/>\n";

echo 	$GHtml->formInputButton("Save",
                              "confirm",
                              "Confirm",
                              $stlButton).
			
			$GHtml->formInputButton("Back",
                              "back",
                              "Back",
                              $stlButton).
  		
  		"</form>	\n";

?> 